﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.hdomext.com/2.0">
<head>
    <title></title>
    <link href="../../Theme/DomExtGray/gray.css" rel="Stylesheet" type="text/css" />
    <link href="PageModel.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="../../domExt.js"></script>

</head>
<body >
主菜单
    <h:menu id="testmenu" type="main">
        <h:menuitem key="1" itemtemplet="新建(N)">
            <h:menuitem key="1_1" itemtemplet="菜单1_1">
            </h:menuitem>
            <h:menuitem key="1_2" itemtemplet="菜单1_2">
                <h:itemtemplet>
                       项目(p)
                </h:itemtemplet>
                <h:menuitem key="1_2_1" itemtemplet="WPF应用程序">
                </h:menuitem>
            </h:menuitem>
        </h:menuitem>
        <h:menuitem key="2" itemtemplet="编辑(N)">
            <h:menuitem key="2_1" itemtemplet="新建(N)">
            </h:menuitem>
            <h:menuitem key="2_2" itemtemplet="菜单2_2(N)" addhr="true">
                <h:itemtemplet>
                       项目(p)
                </h:itemtemplet>
                <h:menuitem key="2_2_1" itemtemplet="WPF应用程序">
                </h:menuitem>
            </h:menuitem>
            <h:menuitem key="2_3" itemtemplet="菜单2_3(N)">
            </h:menuitem>
        </h:menuitem>
        <h:menuitem key="3" itemtemplet="编辑2(N)">
        </h:menuitem>
    </h:menu>
       <br />
    <br />
    <br />
    <br />
    <br />右键菜单
    <br />
    <h:menu id="Menu3" type="popup">
        <h:menuitem key="1" itemtemplet="新建(N)">
            <h:menuitem key="1_1" itemtemplet="菜单1_1">
            </h:menuitem>
            <h:menuitem key="1_2" itemtemplet="菜单1_2">
                <h:itemtemplet>
                       项目(p)
                </h:itemtemplet>
                <h:menuitem key="1_2_1" itemtemplet="WPF应用程序">
                </h:menuitem>
            </h:menuitem>
        </h:menuitem>
        <h:menuitem key="2" itemtemplet="编辑(N)">
            <h:menuitem key="2_1" itemtemplet="新建(N)">
            </h:menuitem>
            <h:menuitem key="2_2" itemtemplet="菜单2_2(N)" addhr="true">
                <h:itemtemplet>
                       项目(p)
                </h:itemtemplet>
                <h:menuitem key="2_2_1" itemtemplet="WPF应用程序">
                </h:menuitem>
            </h:menuitem>
            <h:menuitem key="2_3" itemtemplet="菜单2_3(N)">
            </h:menuitem>
        </h:menuitem>
        <h:menuitem key="3" itemtemplet="编辑2(N)">
        </h:menuitem>
    </h:menu>
    <br />
    <br />
<br /><br /><br /><br />
<br />
<br />
    <br />
   <div id="msgBox"></div>
    <script type="text/javascript">
        _h.ready(function () {
            var testmenu = _g("#testmenu");
            testmenu.SetEventFun("1_2_1", function () {
                _g("#msgBox").html("1_2_1_WPF应用程序");
            });
            testmenu.SetEventFun("2_2_1", function () {
                _g("#msgBox").html("2_2_1_WPF应用程序");
            });
            testmenu.SetEventFun("1_1", function () {
                _g("#msgBox").html("1_1_WPF应用程序");
            });
            testmenu.Bind();
            _g("#Menu3").Bind();
        });
        
       
    </script>
</body>
</html>
